<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >列表</a></li>
			<li><a href="{:url('Levelanchor/add')}">添加</a></li>
		</ul>

		<div class="wrap js-check-wrap">
			<ul class="nav nav-tabs slider lang">
				<volist name="langData" id="vo">
					<li <if condition="$vo.id eq $langId"> class="active" </if> > <a data-toggle="tab" data-id="{$vo.id}">{$vo.name}</a></li>
				</volist>
			</ul>
		</div>

		<form method="post" class="js-ajax-form" >
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>等级</th>
						<th>名称</th>
						<th>等级上限（总收益）</th>
						<th>私密相册价格上限</th>
						<th>私密视频价格上限</th>
						<th>视频通话价格上限</th>
						<th>图标</th>
						<th align="center">{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="list" item="vo">
					<tr>
						<td>{$vo['level']}</td>
						<td>{$vo['levelname']}</td>
						<td>{$vo['level_up']}</td>
						<td>{$vo['secret_photo']}</td>
						<td>{$vo['secret_video']}</td>
						<td>{$vo['telephone']}</td>
                        <td><img src="{$vo['thumb']}" style="height:24px"></td>
						<td>	
                            <a class="btn btn-xs btn-primary" href='{:url("Levelanchor/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Levelanchor/del',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script>
		var langId = '{$langId}',
			defaultLangId = '{$defaultLangId}';
        (function(){
            $('.lang li a').click(function () {
                console.log($(this).data('id'));
                window.location = '{:url("/admin/levelanchor/index")}?langId=' + $(this).data('id');
            });
	        if (langId == null || langId == '' || langId == 0) {
		        langId = defaultLangId;
                window.location = '{:url("/admin/levelanchor/index")}?langId=' + langId;
	        }


        })()

	</script>
</body>
</html>